package com.jian.exceldaoru.controller;

import lombok.Getter;

import java.util.stream.Stream;

/**
 * Created by lijian on 2020/10/19 14:23
 */
@Getter
public enum TableEnum {
    STATISTICAL_TIME("统计时间"),

    STATISTICAL_TYPE("日期类型"),

    LINE_NAME("线路名称"),

    TABULATION_TIME("制表时间"),

    TABULATOR("制表人"),

    TABULATING_UNIT("制表单位"),;
    private String tableItem;
    TableEnum(String tableItem){
        this.tableItem = tableItem;
    }
    public static TableEnum toType(String value){
        return Stream.of(TableEnum.values())
                .filter(c->c.tableItem.equals(value))
                .findAny()
                .orElse(null);
    }
}
